package model

// 转发路由命中详情表
type AppRouterLog struct {
	Id            uint64 `gorm:"column:id;type:bigint unsigned;primaryKey;autoIncrement;not null" form:"id" json:"id"`
	Rid           uint64 `gorm:"column:rid;type:bigint unsigned;not null;comment:路由ID" form:"rid" json:"rid"`                         //路由ID
	RUri          string `gorm:"column:r_uri;type:varchar(200);comment:请求URL地址，从targets中读取的某个地址列表" form:"r_uri" json:"r_uri"`         //请求URL地址，从targets中读取的某个地址列表
	Code          uint   `gorm:"column:code;type:int unsigned;comment:响应的HTTPCODE值" form:"code" json:"code"`                          //响应的HTTPCODE值
	ResponeLength uint   `gorm:"column:respone_length;type:int unsigned;comment:响应的字节大小" form:"respone_length" json:"respone_length"` //响应的字节大小
	ResponeTime   uint   `gorm:"column:respone_time;type:int unsigned;comment:响应耗时 单位：毫秒" form:"respone_time" json:"respone_time"`    //响应耗时 单位：毫秒
	GatwatTime    uint   `gorm:"column:gatwat_time;type:int unsigned;comment:网关处理耗时 单位：毫秒" form:"gatwat_time" json:"gatwat_time"`     //网关处理耗时 单位：毫秒
	ClientTime    string `gorm:"column:client_time;type:datetime;comment:请求时间" form:"client_time" json:"client_time"`                 //请求时间
}

// 返回所属表名信息
func (c *AppRouterLog) TableName() string {
	return "app_router_log"
}
